package com.mycompany.xxy_dome.controller;

import com.mycompany.xxy_dome.modle.User;
import com.mycompany.xxy_dome.view.Main;


public class LoginController {

    public static boolean Controller(String username, String password) {
        User user = new User();

        if (user.getName().equals(username) && user.getPassword().equals(password)) {
            // 用户名和密码正确
            new Login().start();  // 假设Login类有一个名为start的方法
            return true;
        }
        return false;
    }

}

// 登录后的处理类
class Login {
    public void start() {
        int ui_WIDTH = 1200;
        int ui_HEIGHT = 600;
        Main main = new Main(ui_WIDTH,ui_HEIGHT);
        main.setVisible(true);
        main.scene("/images/lie.gif");// 更新场景
    }
}
